package com.tao.mapper;

import com.github.pagehelper.Page;
import com.tao.pojo.dto.PageSelectHistoryDto;
import com.tao.pojo.entity.Order;
import com.tao.pojo.vo.OrderVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

@Mapper
public interface OrderMapper {
    void orderSubmit(Order order);

    void orderCancel(Order order);

    void updateOrder(Order order);

    //一次只能接收一个参数，把要传的参数封装在一起，否则识别不了
    Page<OrderVo> getHistoryOrder(PageSelectHistoryDto pageSelectHistoryDto);

    @Select("select * from orders where id=#{id}")
    Order getOrderById(Integer id);

    List<Order> selectByTime(LocalDateTime time,Integer status);


}
